<?php
	$slide = NULL;
	if ($slides) {
		foreach ($slides as $s) {
			$slide = $s;
			break;
		}
	}
		
?>
<div id='slide'>
	<div class='main_img'>
		<img src='/uploads/cms/big_slide_<? echo ($slide)?($slide['picture']):"" ?>' />
		<div class='bg_main_img'></div>
	</div>
    <div class='logo_2'></div>
	<div class='slide_menu'>
	<?php
		$cnt = 0;
		foreach ($slides as $slide)
		{
			$cnt ++;
		?>
		<div class='slide_menu_item <?=($cnt==1)?"active":""?>' style='<?php echo ($cnt == 1)?"margin-left:0px;":""?>'>
			<img src='/uploads/cms/slide_<? echo $slide['picture'] ?>' />
            <div class='bg_slide_img bg_slide_img_<?php echo $cnt;?>'></div>
		</div>
		<?
		}
	?>
	</div>
</div>

<div class='wrap_datepicker'>
	<div class='title cufon'>
    	SƠ ĐỒ SÂN BÓNG
    </div>
</div>

<div class='wrap_ground'>
	<div class='wrap_ground_left'>
    	<div class='ground_item'>
        	<?php
			$ground = $grounds[6];
			?>
        	<a onclick='show_popup("<?php echo $ground['id']?>")'>
                <img src='/uploads/ground/doc_<?php echo ($ground['picture'])?$ground['picture']:""?>' />
                <div class='ground_name cufon' style='top:168px;'><?php echo ($ground['name'])?$ground['name']:""?></div>
            </a>
        </div>
        <div class='ground_item' style='margin:0 1px 1px; width:447px;'>
        	<div class='ground_car'></div>
            <div class='ground_enter'></div>
            <div class='ground_car'></div>
        </div>
        <div style='clear:both'></div>
        <?
		for ($i = 5; $i>3; $i--)
		{
			$ground = $grounds[$i];
		?>
        <div class='ground_item' style='width:357px; height:267px;<?php echo ($i==5)?"margin-right:1px;":""?>'>
        	<a onclick='show_popup("<?php echo $ground['id']?>")'>
                <img src='/uploads/ground/<?php echo ($ground['picture'])?$ground['picture']:""?>' style='position:absolute;bottom:-12px;' />
                <div class='ground_name cufon' style='top:135px;'><?php echo ($ground['name'])?$ground['name']:""?></div>
            </a>
        </div>
        <?
		}
		?>
    </div>
    <div class='wrap_ground_right'>
    	<?php
		for ($i = 0; $i<4; $i++)
		{
			$ground = $grounds[$i];
		?>
    	<div class='ground_item' style='width:238px;height:156px;float:none;'>
			<a onclick='show_popup("<?php echo $ground['id']?>")'>
                <img src='/uploads/ground/<?php echo ($ground['picture'])?$ground['picture']:""?>' width="238" style='position:absolute;top:-11px;' />
                <div class='ground_name cufon'><?php echo ($ground['name'])?$ground['name']:""?></div>
            </a>
        </div>
        <?
		}
		?>
    </div>
    <div style='clear:both'></div>
</div>

<div class='copyright'>
    <div class='body_line'></div>
    <div style='text-align:center'>
        <?php echo htmlspecialchars_decode($copyright); ?>
    </div>
</div>